<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .avatar{
            width: 150px;
            height: 150px;
            border-radius: 50%;
            overflow: hidden;
        }
        .avatar img{
            width: 100%;
            height: 100%;

            /* 兼容旧版 webkit浏览器 */
            -webkit-object-fit: cover;
            /* 等比缩放，正好完全覆盖当前容器 */
            object-fit: cover;
        }
    </style>
</head>
<body>
    <div class="avatar">
        <img src="./assets/head1.jpg" alt="">
    </div>
</body>
</html>